﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace OtherDevice
{
    [Description("比例阀")]
    public partial class AventicsCtrl : UserControl
    {
        public AventicsCtrl()
        {
            InitializeComponent();
        }
        Aventics aventicsControl;
        public void FlushToDlg(Aventics aventics, Control father = null)
        {
            try
            {
                if (aventics == null)
                    return;
                if (father != null)
                    this.Location = new Point(father.Location.X, father.Location.Y);
                this.aventicsControl = aventics;
                this.Dock = DockStyle.Fill;
                this.Show();
            }
            catch (Exception)
            {

            }

        }

        private void AventicsCtrl_Load(object sender, EventArgs e)
        {
            
        }

        private void btn_TestAventics_Click(object sender, EventArgs e)
        {
            aventicsControl.Set(1, double.Parse(txt_Value.Text));
        }
    }
}
